<!doctype html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<button id="btn">按钮</button>
<script>
var button = document.getElementById("btn");
button.onclick = function(){
    alert("你单击了一次！");
} 
</script>
</body>
</html>
